/* 书画摄影懒加载页面所使用的js
 * @author 王校兵
 * @date 2016-7-20
 * @version 1.0
 */

//拼接商品下方十个艺术家信息
function combinTenArtist(data) {
	var html = "";
	for (var index = 9; index < 19; index++) {
		html += "<div class='ten_ad_pic'><a href=" + data[index][2]
				+ "><img  src=" + data[index][0] + " alt=" + data[index][1]
				+ " style='width:100%; float:left;' /></a></div>";
	}
	return html;
}

// 拼接艺术家推介四十个艺术家信息
function combinFortyArtist(data) {
	var html = "<div style='width:100%;'>";
	for (var index = 0; index < 10; index++) {
		html += "<div class='ten_ad_pic'><a href=" + data[index][2]
				+ "><img  src=" + data[index][0] + " alt=" + data[index][1]
				+ " style='width:100%; float:left;' /></a></div>";
	}
	html += "</div>";

	html += "<div style='width:100%;'>";
	for (var index = 10; index < 20; index++) {
		html += "<div class='ten_ad_pic'><a href=" + data[index][2]
				+ "><img  src=" + data[index][0] + " alt=" + data[index][1]
				+ " style='width:100%; float:left;' /></a></div>";
	}
	html += "</div>";

	html += "<div style='width:100%;'>";
	for (var index = 20; index < 30; index++) {
		html += "<div class='ten_ad_pic'><a href=" + data[index][2]
				+ "><img  src=" + data[index][0] + " alt=" + data[index][1]
				+ " style='width:100%; float:left;' /></a></div>";
	}
	html += "</div>";

	html += "<div style='width:100%;'>";
	for (var index = 30; index < 40; index++) {
		html += "<div class='ten_ad_pic'><a href=" + data[index][2]
				+ "><img  src=" + data[index][0] + " alt=" + data[index][1]
				+ " style='width:100%; float:left;' /></a></div>";
	}
	html += "</div>";
	return html;
}

// 拼接书画摄影商品部分区域信息
function combinPaintingGoods(floor,title,data,newsTitle,newsData){
	
	var html = "<div class='mainbody_common_three_ad'  id='common_three_ad'>"
	+"<div class='floor' style='width:100%; margin-top:3%;'>"
	+"<div class='floor_num'><font>"+ floor +"</font></div>"
	+"<div  class='floor_num_font'>";
			
	// 循环生成楼层部分
	for(var index=0;index<title.length; index++){
		html += "<font><b>"+ title[index] +"</b></font>";
		if(!index == title.length-1){
			html += "&nbsp;&nbsp;&nbsp;&nbsp;";
		}
	}
			
	html +="</div>"
	+"<div style='border:2px solid #b89052; width:100%; float:left;'></div>"
	+"</div>"
	+"<div class='common_three_ad_left'>";
	
	
	html += " <div class='common_three_ad_big_img'>"
       +"<a href='" + data[0][2] + "'><img src=" + data[0][0] + " alt="
			+ data[0][1] + "></img></a>"
       +"</div>"
       +"<div class='common_three_ad_goods'>";
	
	// 八个商品部分
	for (var index = 1; index <= 8; index++) {
		html += "<div class='common_three_ad_goods_info'>";
		html += "<a href='" + data[index][2] + "'><img  src=" + data[index][0]
				+ " alt=" + data[index][1] + " /></a>";
		html += "<div class='common_three_ad_goods_info_text'>";
		html += "<div class='common_three_ad_goods_info_text_head'>";
		html += "<div class='common_three_ad_goods_info_text_head_left'>￥"
				+ data[index][4] + "</div>";
		html += "<div class='common_three_ad_goods_info_text_head_right'>评价:"
				+ data[index][5] + "</div>";
		html += "</div>";
		html += "<div class='common_three_ad_goods_info_text_min'>";
		html += "<a href=" + data[index][2] + ">" + data[index][3] + "</a>";
		html += "</div>";

		// 以下三个为商品下方小图标
		html += "<div class='common_three_ad_bottom'>";
		html += "<img src='images/img_05_34.jpg'/>";
		html += "</div>";
		// 关闭div
		html += "</div>";
		html += "</div>";

	};
	
	// div关闭
	html += "</div>";
	html += "</div>";
	
	// 商品右部分
	html += "<div class='common_three_ad_right'>";
	
	
	
	
	
	html += "<div class='xinwen_right_title'>"
		+ "<font style='margin-left:10%; line-height:30px;'>" + newsTitle
		+ "</font>" + "</div>" + "<div class='xinwem_right_title_img'>"
		+ "<img src=" + newsData[0][1]
		+ " style='width:100%; height:160px;' />"
		+ "<div class='xinwen_left_left_img_text'><a href="
		+ newsData[1][1] + ">" + newsData[1][0] + "</a></div>" + "</div>"
		+ "<div class='xinwen_right_text'>"
		+ "<ul style='margin-top:0; padding-top:3%;'>";
for (var index = 2; index < 9; index++) {

	html += "<li><a href=" + newsData[index][1] + ">" + newsData[index][0]
			+ "</a></li>";

}
html += "</div>";
	
	
	
	
	
	
	
	
	html += "</div>";

	// 至此商品区域完成，关闭商品区域和右方区域
	html += "</div>";
	
	return html;
};

















